//
//  SearchHeaderTableViewCell.m
//  miaopai
//
//  Created by duyifang on 15/11/20.
//  Copyright © 2015年 Crow Zhang. All rights reserved.
//

#import "SearchHeaderTableViewCell.h"

@interface SearchHeaderTableViewCell ()

@property(nonatomic, retain) UILabel *headerLabel;

@end

@implementation SearchHeaderTableViewCell

- (void)dealloc
{
    [_headerLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.headerLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_headerLabel];
        [_headerLabel release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _headerLabel.frame = CGRectMake(10, (self.frame.size.height - 15) / 2, 100, 15);
}

- (void)setLabelString:(NSString *)labelString
{
    if (_labelString != labelString) {
        [_labelString release];
        _labelString = [labelString copy];
    }
    _headerLabel.text = labelString;
    _headerLabel.font = [UIFont systemFontOfSize:13];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
